﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Objects;
using InspectionVehicule.WorkflowHost;


namespace InspectionVehicule.Pages
{
    public partial class CreationInspection : Page
    {
        //private InspectionDAL.Vehicule _donnees;
        //public override object State
        //{
        //    get
        //    {
        //        return _donnees;
        //    }
        //    set
        //    {
        //        _donnees = (InspectionDAL.Vehicule)value;
        //    }
        //}           


        protected void btnNext_Click(object sender, EventArgs e)
        {
            InspectionWorkflowHost host = new InspectionWorkflowHost();
            string urlPageInspection = host.DemarrerInspection(txtMecanicien.Text);
            Session["WorkflowId"] = host.WorkflowId;
            HttpContext.Current.Response.Redirect(urlPageInspection);
        }
    }
}